<?php

namespace app\classroom\controller;
use app\classroom\model\ClassroomModel;
use cmf\controller\HomeBaseController;


class ListController extends HomeBaseController
{
   public function  index()
   {
       $id= $this->request->param('id', 0, 'intval');
       $model = new ClassroomModel();
       $data = $model->select();
       $this->assign('data', $data);
       return $this->fetch();
   }
    //抢座的班的位置
    public function classRoom($id)
    {

        if($id==1)
        {
            return $this->fetch('classroom1');
        }elseif($id==2)
        {
            return $this->fetch('classroom2');
        }
        else
        {
            return $this->fetch('classroom3');
        }


    }
}